import { 
    createRouter,
    createWebHashHistory,
    RouteRecordRaw
 } from "vue-router";

 import Home from "../views/Home.vue";
 import Users from "../views/Users.vue";
import Hello from "../components/HelloWorld.vue";
 const routes:Array<RouteRecordRaw>=[
    {
        path:"/",
        redirect:"/home",
    },
    {
        path:"/home",
        name:"home",
        component: Home,
    },
    {
        path:"/user/:userId",
        name:"user",
        component: Users,
    },
    {
        path:"/hello",
        name:"hello",
        component: Hello,
    },
 ];

 const router = createRouter({
    history:createWebHashHistory(),
    routes,
 });
 export default router;